import { CommonProps, Properties } from '../common/CommonProps';
import { IGaeaSetting } from '../../defines/application';

export class Props extends CommonProps {
  public editSetting: IGaeaSetting = {
    key: 'gaea-inputnumber',
    name: 'InputNumber',
    type: 'money',
    grouping: 'numberType',
    editors: [
      ...Properties,
      {
        field: 'unit',
        text: 'Unit',
        type: 'string',
        maxLength: 8
      },
      {
        field: 'placeholder',
        text: 'Placeholder',
        type: 'string'
      }
      // {
      //   field: 'maxLength',
      //   text: 'MaxLength',
      //   type: 'number',
      // },
    ]
  };

  public placeholder = '请输入'; // 控件提示语
  // public maxLength: number | undefined = 15; // 最大输入长度
  public minLength: number | undefined = undefined; // 最小输入长度 TODO 待实现
  public unit = '';
  public errorMsg?: string = '';
  public withinReg?: boolean = false;
  public readonly?: any;
}

export class State { }
